import  homeState from '../state/homeState'
import homeMethod from '../method/homeMethod'


const reducer = (state = homeState, action)=>{
  try{
    return homeMethod[action.type](state,action.data)
  }catch(e){

    return state
  }
}

export default reducer